import fetch from '@/utils/fetch'
import qs from 'qs'
import { ICommonApi } from './types/common'

const CommonApi: ICommonApi = {
	// 获取字典列表
	getDictPage: params => {
		return fetch({
			method: 'post',
			url: '/sysDictValue/getPage',
			data: qs.stringify(params)
		})
	},
	// 删除字典数据
	deleteDict: params => {
		return fetch({
			method: 'post',
			url: '/sysDictValue/delete',
			data: qs.stringify(params)
		})
	}
}

export default CommonApi
